<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        #app{
            margin: 50px;
        }
        .searchbox{
            height: 60px;
            background-color: cornflowerblue;
        }
        .title{
            color: aliceblue;
            width: 100%;
            font-size: 20px;
        }
        input{
            border-radius: 20px;
            border: none;
            outline: none;
            width: 100%;
            text-align: center;
            height: 20px;
            margin-top: 10px;
        }
        .searchimg img{
            width: 100%;
            height: 60px;
            margin-top: 10px;
        }
        .title2{
            font-weight: bold;
            padding: 10px 0;
        }
        #three{
            text-align: center;
        }
        #three span{
            background-color: #E3E4E5;;
            margin-left: 2px;
            font-size: 10px;
            text-align: center;
            width: 25%;
            margin-top: 15px;
        }
        .tabbar{
            position: fixed;
            bottom: 0;
            width: 80%;
            border-top: 1px solid #ccc;
            display: flex;
            justify-content: space-around;
            text-align: center;
            line-height: 40px;
        }
        .tabbar div.active{
            color: white;
            background-color: cornflowerblue;
            font-size: 16px;
        }
        #app2 .title{

            color: black;
        }
        .card{
            font-size: 6px;
        }
        .card img{
            width: 70px;
            height: 70px;
            margin-bottom: 10px;
        }
        .sales{
            margin-left: 4px;
        }
        .quan{
            border: 1px solid #f00;
            margin-left: 2px;
            color: #f00;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="searchbox">
            <div class="title">饿了么</div>
            <input type="text" placeholder="输入商家，商品名称">
        </div>
        <div class="searchimg">
            <img src="img/demo1.jpg" alt="">
        </div>
        <div>
            <div class="title2">猜你喜欢</div>
        </div>
        <div id="sle">
            <span>
                <select>
                    <option v-for="(item,index) in opt"> {{ item }}</option>
                </select>
            </span>
            <span v-for="(item,index) in arr"> {{ item }} </span>
        </div>
        <div id="three">
            <span v-for="(item,index) in arr"> {{ item }} </span>

        </div>
        <div id="app2">
            <div class="card" v-for="(item,index) in arr" style="width: 100%;float: left;">
                <div style="float: left;width: 80px;"><img :src="item.pic" alt=""></div >
                <div class="title" style="float: left;width: 123px;">{{item.title}}</div>
                <div class="score" style="float: left;width: 80px;">评分{{item.score}}</div>
                <div class="sales" style="float: left;width: 80px;">月销{{item.sales}}</div>
                <div class="delivery" style="float: left;width: 60px;">起送￥{{item.delivery}}</div>
                <div class="distribution" style="float: left;width: 81px;">远距离配送￥{{item.distribution}}</div>
                <div class="minute" style="float: left;width: 53px;">{{item.minute}}分钟&nbsp;km</div>
                <div style="float: left;">
                    <span v-for="(item,index) in quan" class="quan">{{ item }}</span>
                </div>
            </div>
            
        </div>
        <div id="app3">
            <div class="tabbar">
                <div  :class="{active: currentIndex == index }"  @click="handleClick(index)" class="btn" v-for="(item,index) in list">
                    <div class="name">{{item.name}}</div>
                </div>
            </div>
        </div>
    </div>

    <script src="./vue-2.5.21.js"></script>
    <script src="demo1.js"></script>
</body>
</html>